#ifndef USERMANAGER_H
#define USERMANAGER_H

#include <QObject>
#include <memory.h>

// 存储用户信息
class UserManager: public QObject, public std::enable_shared_from_this<UserManager>
{
    Q_OBJECT
public:
    UserManager() = default;

    void setName(const QString& name) { _name = name; }
    void setToken(const QString& token) { _token = token; }
    void setUid(const int uid) { _uid = uid; }

    QString getName() const { return _name; }
    QString getToken() const { return _token; }
    int getUid() const { return _uid; }

private:
    QString _name;
    QString _token;
    int _uid;
};

#endif // USERMANAGER_H
